package com.cangxuan.manage.dao;

import com.cangxuan.manage.entity.Goods;
import com.cangxuan.manage.entity.Registration;
import com.cangxuan.manage.entity.UserAmountRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 作者:游星宇
 * 挂单
 */
@Mapper
public interface IRegistrationDao {
    List<Registration> selectById(@Param("pageIndex") int pageIndex,
                                      @Param("pageSize") int pageSize,
                                      @Param("name") String name,
                                      @Param("userId") Integer userId);
    int selectCount( @Param("name") String name,
            @Param("userId") Integer userId);

    List<Registration> select(@Param("name") String name ,
                             @Param("userId") Integer userId);
    @Update("update registration set state = 2 where registration.id = #{id} ")
    int update(@Param("id")int id);
}
